entrycompletion: Remove an unused field
authorMatthias Clasen <mclasen@redhat.com>
Sat, 11 Apr 2020 17:09:45 +0000 (13:09 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 11 Apr 2020 21:29:27 +0000 (17:29 -0400)
No point in storing a device that is never used.

gtk/gtkentrycompletion.c
gtk/gtkentryprivate.h

index ad0b36d6349d84c84f4af8296b2969e70a122630..1d5f32fae9d6b06da1020290db388add4a4648f7 100644 (file)
@@ -2233,7 +2233,6 @@ gtk_entry_completion_changed (GtkWidget *widget,
                               gpointer   user_data)
 {
   GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
-  GdkDevice *device;
 
   if (!completion->priv->popup_completion)
     return;
@@ -2257,14 +2256,6 @@ gtk_entry_completion_changed (GtkWidget *widget,
       return;
     }
 
-  device = gtk_get_current_event_device ();
-
-  if (device && gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
-    device = gdk_device_get_associated_device (device);
-
-  if (device)
-    completion->priv->device = device;
-
   completion->priv->completion_timeout =
     g_timeout_add (COMPLETION_TIMEOUT,
                    gtk_entry_completion_timeout,
index de765d9b49b58ba2be7b33f9ff1d7d4258561123..af5e24cd8cbdc5f6a46db3a90dd8e25ae7fa556f 100644 (file)
@@ -104,8 +104,6 @@ struct _GtkEntryCompletionPrivate
   gchar *completion_prefix;
 
   GSource *check_completion_idle;
-
-  GdkDevice *device;
 };
 
 void     _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion);